package com.xy.model;

import java.io.Serializable;

import javax.persistence.Cacheable;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;

/*
 * @学费表
 */
@SuppressWarnings("serial")
@Entity
@Table
@Cacheable
public class BookFee extends Identified implements Serializable {

  private String academicYear; // 学年
  private String semester;// 学期
  private int payFee;// 已缴费金额
  // 对应到学生
  @ManyToOne(targetEntity = Student.class)
  @JoinColumn(name = "Student_id", referencedColumnName = "id")
  @Cascade(CascadeType.SAVE_UPDATE)
  private Student student;
  // 对应到班级
  @ManyToOne(targetEntity = BJi.class)
  @JoinColumn(name = "BJi_id", referencedColumnName = "id")
  @Cascade(CascadeType.SAVE_UPDATE)
  private BJi bJi;

  public int getPayFee() {
    return payFee;
  }

  public String getAcademicYear() {
    return academicYear;
  }

  public void setAcademicYear(String academicYear) {
    this.academicYear = academicYear;
  }

  public String getSemester() {
    return semester;
  }

  public void setSemester(String semester) {
    this.semester = semester;
  }

  public void setPayFee(int payFee) {
    this.payFee = payFee;
  }

  public Student getStudent() {
    return student;
  }

  public void setStudent(Student student) {
    this.student = student;
  }

  public BJi getbJi() {
    return bJi;
  }

  public void setbJi(BJi bJi) {
    this.bJi = bJi;
  }

  public BookFee() {
    super();
    // TODO Auto-generated constructor stub
  }

}
